package com.pcbly.web.business.dict;

import java.util.List;

import com.pcbly.web.bean.dict.DictCategoryValueBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.persistence.dict.DictCategoryCombDao;
import com.pcbly.web.persistence.dict.DictCategoryFilterDao;
import com.pcbly.web.persistence.dict.DictCategoryValueDao;

public class DictCategoryValueServiceImp extends
		BaseServiceImp<DictCategoryValueBean> implements
		DictCategoryValueService {

	public DictCategoryValueServiceImp() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 978920698388658960L;

	private DictCategoryValueDao dictCategoryValueDao;

	protected DictCategoryCombDao dictCategoryCombDao;

	private DictCategoryFilterDao dictCategoryFilterDao;

	public void setDictCategoryFilterDao(
			DictCategoryFilterDao dictCategoryFilterDao) {
		this.dictCategoryFilterDao = dictCategoryFilterDao;
	}

	public void setDictCategoryCombDao(DictCategoryCombDao dictCategoryCombDao) {
		this.dictCategoryCombDao = dictCategoryCombDao;
	}

	public void setDictCategoryValueDao(
			DictCategoryValueDao dictCategoryValueDao) {
		this.dictCategoryValueDao = dictCategoryValueDao;
	}

	@Override
	public List<DictCategoryValueBean> queryListById(String id)
			throws Exception {
		// TODO Auto-generated method stub
		return dictCategoryValueDao.queryListById(id);
	}

	@Override
	public DictCategoryValueBean findById(String id) throws Exception {
		// TODO Auto-generated method stub
		return dictCategoryValueDao.get(DictCategoryValueBean.class, id);
	}

	@Override
	public void removeDictCategoryValueById(String id) throws Exception {
		// TODO Auto-generated method stub
		dictCategoryCombDao.removeDictCategoryCombByValueId(id);
		dictCategoryFilterDao.removeDictCategoryFilterByDictValueId(id);
		dictCategoryValueDao.removeById(id);
	}

	@Override
	public void createDictCategoryValue(DictCategoryValueBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		dictCategoryValueDao.createDictCategoryValue(bean);
	}

	@Override
	public void updateDictCategoryValue(DictCategoryValueBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		dictCategoryValueDao.updateDictCategoryValue(bean);
	}

}
